﻿@{
    ViewBag.Title = "Details";
    Layout = "~/Views/Shared/_LayoutIndex.cshtml";
}

<script>
    var keyValue = request('keyValue');

    $(function () {
        initControl();
        //GetGrid1();
        //GetGrid2();
        //GetGrid3();
        //GetGrid4();
    });

    function initControl() {
        //layout布局
        $('#layout').layout({
            applyDemoStyles: true,
            onresize: function () {
                $(window).resize()
            }
        });
        $(window).resize(function (e) {
            window.setTimeout(function () {
                $('#gridTable1').setGridWidth(($('.gridPanel').width()));
                $("#gridTable1").setGridHeight($(window).height() - 141.5);
                $('#gridTable2').setGridWidth(($('.gridPanel').width()));
                $("#gridTable2").setGridHeight($(window).height() - 141.5);
                $('#gridTable3').setGridWidth(($('.gridPanel').width()));
                $("#gridTable3").setGridHeight($(window).height() - 141.5);
                $('#gridTable4').setGridWidth(($('.gridPanel').width()));
                $("#gridTable4").setGridHeight($(window).height() - 141.5);
            }, 200);
            e.stopPropagation();
        });
        //婚姻状况
        $("#MarryInfo").ComboBox({
            data: [{ "key": "1", "value": "未婚" }, { "key": "2", "value": "已婚" }, { "key": "3", "value": "离婚、离异" }, { "key": "4", "value": "丧偶" }],
            height: "200px",
            id: "key",
            text: "value",
            description: "==请选择==",
        });
        if (!!keyValue) {
            $.SetForm({
                url: "../../QualificationManage/Member/GetFormJson",
                param: { keyValue: keyValue },
                success: function (data) {
                    $("#MemberInfo").SetWebControls(data);
                    var State = data.State == 1 ? "审批中" : data.State == 3 ? "无效" : "有效";
                    $("#State").val(State);
                    var Sex = data.Sex == 1 ? "男" : "女";
                    $("#Sex").val(Sex);
                    var HasLiveCard = data.HasLiveCard == 1 ? "是" : "否";
                    $("#HasLiveCard").val(HasLiveCard);
                }
            });
        }
        $("input").attr("readonly", "readonly");
    }

    function skip(type) {
        switch (type) {
            case 1:
                $("#MemberInfo").show();
                $("#SelectRoom").hide();
                $("#Rectification").hide();
                $("#Qualification").hide();
                $("#ContractInfo").hide();
                $("#LogInfo").hide();
                $(".profile-nav ul li").removeAttr("class");
                $(this).attr("class", "active");
                break;
            case 2:
                $("#SelectRoom").show();
                $("#MemberInfo").hide();
                $("#Rectification").hide();
                $("#Qualification").hide();
                $("#ContractInfo").hide();
                $("#LogInfo").hide();
                $(".profile-nav ul li").removeAttr("class");
                $(this).attr("class", "active");
                GetGrid1();
                break;
            case 3:
                $("#Rectification").show();
                $("#SelectRoom").hide();
                $("#MemberInfo").hide();
                $("#Qualification").hide();
                $("#ContractInfo").hide();
                $("#LogInfo").hide();
                $(".profile-nav ul li").removeAttr("class");
                $(this).attr("class", "active");
                GetGrid2();
                break;
            case 4:
                $("#Rectification").hide();
                $("#SelectRoom").hide();
                $("#MemberInfo").hide();
                $("#Qualification").show();
                $("#ContractInfo").hide();
                $("#LogInfo").hide();
                $(".profile-nav ul li").removeAttr("class");
                $(this).attr("class", "active");
                GetGrid3();
                break;
            case 5:
                $("#Rectification").hide();
                $("#SelectRoom").hide();
                $("#MemberInfo").hide();
                $("#Qualification").hide();
                $("#ContractInfo").show();
                $("#LogInfo").hide();
                $(".profile-nav ul li").removeAttr("class");
                $(this).attr("class", "active");
                GetGrid4();
                break;
            case 6:
                $("#Rectification").hide();
                $("#SelectRoom").hide();
                $("#MemberInfo").hide();
                $("#Qualification").hide();
                $("#ContractInfo").hide();
                $("#LogInfo").show();
                GetLogGrid();
                $(".profile-nav ul li").removeAttr("class");
                $(this).attr("class", "active");
                break;
            default:
                break;
        }
    }

    //加载表格
    function GetGrid1() {
        var selectedRowIndex = 0;
        var $gridTable = $('#gridTable1');
        var queryJson = {};
        queryJson["MemberId"] = keyValue;
        $gridTable.jqGrid({
            url: "../../QualificationManage/SelectRoomRecord/GetPageList",
            postData: { queryJson: JSON.stringify(queryJson) },
            datatype: "json",
            height: $(window).height() - 141.5,
            autowidth: true,
            colModel: [
                { label: "主键", name: "id", hidden: true },
                { label: "状态", name: "state", hidden: true },
                { label: "房间名称", name: "roomallname", index: "roomallname", width: 350, align: "left" },
                { label: "会员名称", name: "name", index: "name", width: 150, align: "center" },
                { label: "会员编号", name: "membercode", index: "membercode", width: 150, align: "center" },
                { label: "会员手机号", name: "phone", index: "phone", width: 120, align: "center" },
                {
                    label: "状态", name: "stateStr", index: "stateStr", width: 100, align: "center",
                    formatter: function (cellvalue, options, rowObject) {

                        switch (rowObject.state) {
                            case 1: return "有效"; break;
                            case 2: return "已经签约"; break;
                            case 3: return "已取消"; break;
                            default: return ""; break;
                        }
                    }
                },
                { label: "合同编号", name: "contractcode", index: "contractcode", width: 180, align: "center" },
                {
                    label: "选房类型", name: "category", index: "category", width: 80, align: "center", formatter: function (cellvalue, options, rowObject) {

                        switch (cellvalue) {
                            case 1: return "网上选房"; break;
                            case 2: return "配租"; break;
                            default: return "网上选房"; break;
                        }
                    }
                },
                {
                    label: "选房日期", name: "choosetime", index: "choosetime", width: 200, align: "center",
                    formatter: function (cellvalue, options, rowObject) {
                        return formatDate(cellvalue, 'yyyy-MM-dd hh:mm:ss');
                    }
                },


                { label: "取消日期", name: "canceltime", index: "canceltime", width: 200, align: "center" }
            ],
            viewrecords: true,
            rowNum: 30,
            rowList: [30, 50, 100, 500, 1000],
            pager: "#gridPager1",
            sortname: 'choosetime desc',
            rownumbers: true,
            shrinkToFit: false,
            gridview: true
        });
        $('#gridTable1').setGridWidth($(".ui-layout-center").width() - 56);
    }

    function GetGrid2() {
        var selectedRowIndex = 0;
        $gridTable = $("#gridTable2");
        var queryJson = {
            MemberId: keyValue
        };
        $gridTable.jqGrid({
            url: "../../QualificationManage/SearchRoom/GetPagList",
            postData: { queryJson: JSON.stringify(queryJson) },
            datatype: "json",
            height: $(window).height() - 141.5,
            autowidth: true,
            colModel: [
                { label: "主键", name: "id", hidden: true },
                { label: "单据编号", name: "billcode", index: "billcode", width: 300, align: "center", sortable: false, },
                { label: "单据日期", name: "date", index: "date", width: 300, align: "center", sortable: false, },
                { label: "看房地址", name: "allname", index: "allname", width: 300, align: "center", sortable: false, },
                {
                    label: "状态", name: "state", index: "state", width: 200, align: "center", sortable: false,
                    formatter: function (cellvalue, options, rowObject) {
                        var Msg = "";
                        switch (cellvalue) {
                            case 1: Msg = "<span  style='background-color:#FFA07B' class='label'>待审批</span>";
                                break;
                            case 2: Msg = "<span  style='background-color:#B9C46F' class='label '>未完成</span>";
                                break;
                            case 3: Msg = "<span  style='background-color:#4BC152' class='label '>已完成</span>";
                                break;
                            case 4: Msg = "<span  style='background-color:#D9D6CF' class='label '>已取消</span>";
                                break;
                            case 5: Msg = "<span  style='background-color:#D15252' class='label '>审批未通过</span>";
                                break;
                            default: Msg = "---";
                                break;
                        }
                        return Msg;
                    }
                },
                { label: "申请人", name: "name", index: "names", width: 200, align: "center", sortable: false },
                { label: "手机号", name: "phone", index: "phone", width: 200, align: "center", sortable: false },
                {
                    label: "性别", name: "sex", index: "sex", width: 200, align: "center", sortable: false,
                    formatter: function (cellvalue) {
                        switch (cellvalue) {
                            case 1: return "男";
                            case 2: return "女";
                            default: return "";
                        }
                    }
                },
                { label: "预约看房时间", name: "plantime", index: "plantime", width: 300, align: "center", sortable: false },
                { label: "实际带看人", name: "realman", index: "realman", width: 200, align: "center", sortable: false },
                { label: "看房情况", name: "seeroominfo", index: "seeroominfo", width: 200, align: "center", sortable: false },

            ],
            viewrecords: true,
            rowNum: 30,
            rowList: [30, 50, 100],
            pager: "#gridPager2",
            sortname: 'Date',
            sortorder: 'desc',
            rownumbers: true,
            gridview: true,
            onSelectRow: function (status) {
                selectedRowIndex = $("#" + this.id).getGridParam('selrow');
            },
            gridComplete: function () {
                $("#" + this.id).setSelection(selectedRowIndex, false);
            }
        });
        $('#gridTable2').setGridWidth($(".ui-layout-center").width() - 56);
    }

    function GetGrid3() {
        var selectedRowIndex = 0;
        $gridTable = $("#gridTable3");
        var queryJson = {
            MemberId: keyValue
        };
        $gridTable.jqGrid({
            url: "../../QualificationManage/Member/GetBillPageList",
            postData: { queryJson: JSON.stringify(queryJson) },
            datatype: "json",
            height: $(window).height() - 141.5,
            autowidth: true,
            colModel: [
                { label: "主键", name: "id", hidden: true },
                { label: "单据状态值", name: "state", hidden: true },
                { label: "单据编号", name: "code", index: "code", width: 200, align: "center", sortable: false },
                { label: "单据时间", name: "date", index: "date", width: 200, align: "center", sortable: false },

                {
                    label: "业务类型", name: "category", index: "category", width: 100, align: "center", sortable: false,
                    formatter: function (cellvalue) {
                        var Msg = "";
                        switch (cellvalue) {
                            case 1: Msg = "初次申请";
                                break;
                            case 2: Msg = "再次申请";
                                break;
                            case 3: Msg = "续租申请";
                                break;
                            case 4: Msg = "再次续租申请";
                                break;
                            default: Msg = "---";
                                break;
                        }
                        return Msg;
                    }
                },
                { label: "市局编号", name: "cityburceaucode", index: "cityburceaucode", width: 200, align: "center", sortable: false },
                { label: "姓名", name: "name", index: "name", width: 200, align: "center", sortable: false },
                { label: "身份证号码", name: "idcard", index: "idcard", width: 200, align: "center", sortable: false },
                  {
                      label: "状态", name: "state1", index: "CheckFlag", width: 300, align: "center", sortable: false,
                      formatter: function (cellvalue, options, rowObject) {
                          var Msg = "";
                          switch (rowObject.state) {
                              case 1: Msg = "<span  class='label' style='background-color:#74B981'>初审中（初次)</span>";
                                  break;
                              case 2: Msg = "<span  style='background-color:#6ABD78' class='label '>初审中（再次）</span>";
                                  break;
                              case 0:
                              case 3: Msg = "<span  style='background-color:#B05B5C' class='label '>初审未通过</span>";
                                  break;
                              case 4: Msg = "<span  style='background-color:#CCE099' class='label '>递交资料中</span>";
                                  break;
                              case 5: Msg = "<span  style='background-color:#C1D169' class='label '>市局审批中（材料通过）</span>";
                                  break;
                              case 6: Msg = "<span  style='background-color:#15AD66' class='label '>复审（市局审批通过）</span>";
                                  break;
                              case 7: Msg = "<span  style='background-color:#5CB85C' class='label '>复审通过</span>";
                                  break;
                              case 8: Msg = "<span  class='label'  style='background-color:#f00' >复审未通过</span>";
                                  break;
                              case 9: Msg = "<span  style='background-color:#ccc' class='label '>客户撤回</span>";
                                  break;
                              default: Msg = "---";
                                  break;
                          }
                          return Msg;
                      }
                  },
                {
                    label: "性别", name: "sex", index: "sex", width: 50, align: "center", sortable: false,
                    formatter: function (cellvalue) {
                        switch (cellvalue) {
                            case 1:
                                return "男";
                            case 2:
                                return "女";
                            default: return cellvalue;

                        }
                    }
                },
                { label: "手机号", name: "phone", index: "phone", width: 200, align: "center", sortable: false },

                { label: "提交时间", name: "date", index: "date", width: 200, align: "center", sortable: false },
                { label: "提交次数", name: "submitcount", index: "submitcount", width: 100, align: "center", sortable: false },
                { label: "未通过原因", name: "chcekmemo", index: "chcekmemo", width: 200, align: "center", sortable: false }

            ],
            viewrecords: true,
            rowNum: 30,
            rowList: [30, 50, 100],
            pager: "#gridPager3",
            sortname: 'Date',
            sortorder: 'desc',
            rownumbers: true,
            gridview: true,
            onSelectRow: function (status) {
                selectedRowIndex = $("#" + this.id).getGridParam('selrow');
            },
            gridComplete: function () {
                $("#" + this.id).setSelection(selectedRowIndex, false);
            }
        });
        $('#gridTable3').setGridWidth($(".ui-layout-center").width() - 56);
    }

    function GetGrid4() {
        var selectedRowIndex = 0;
        $gridTable = $("#gridTable4");
        var queryJson = {
            MemberId: keyValue
        };
        $gridTable.jqGrid({
            url: "../../QualificationManage/RentContract/GetPageList",
            postData: { queryJson: JSON.stringify(queryJson) },
            datatype: "json",
            height: $(window).height() - 141,
            autowidth: true,
            colModel: [
                { label: "主键", name: "id", hidden: true },
                { label: "入住人", name: "name", index: "name", width: 100, align: "center", sortable: false },
                { label: "手机号", name: "phone", index: "phone", width: 150, align: "center", sortable: false },
                { label: "身份证号", name: "idcard", index: "idcard", width: 200, align: "center", sortable: false },
                { label: "所属单位", name: "companyname", index: "companyname", width: 200, align: "center", sortable: false },
                { label: "合同编号", name: "code", index: "code", width: 200, align: "center", sortable: false },
                { label: "租赁房产", name: "allname", index: "allname", width: 200, align: "center", sortable: false },
                { label: "状态", name: "state", hidden: true },
                {
                    label: "签约状态", name: "signdatestr", index: "signdate", width: 100, align: "center", sortable: false,
                    formatter: function (cellvalue, options, rowObject) {
                        var msg = cellvalue;
                        if (rowObject.state == 1 || rowObject.state == "1") {
                            msg = "待签约";
                        }
                        if (rowObject.state == 2 || rowObject.state == "2") {
                            msg = "待执行";
                        }
                        if (rowObject.state == 3 || rowObject.state == "3") {
                            msg = "当前";
                        }
                        if (rowObject.state == 4 || rowObject.state == "4") {
                            msg = "历史";
                        }
                        if (rowObject.state == 5 || rowObject.state == "5") {
                            msg = "结束";
                        }
                        return msg;
                    }
                },
                 {
                     label: "签约主体", name: "signtype", index: "signtype", width: 100, align: "center", sortable: false,
                     formatter: function (cellvalue) {
                         var Msg = "";
                         switch (cellvalue) {
                             case 0:
                             case "0":
                             case "1":
                             case 1: Msg = "单位";
                                 break;
                             case "2":
                             case 2: Msg = "个人";
                                 break;
                             default: Msg = cellvalue;
                                 break;
                         }
                         return Msg;
                     }
                 },
                {
                    label: "签约时间", name: "signdate", index: "signdate", width: 150, align: "center", sortable: false,
                    formatter: function (cellvalue, options, rowObject) {
                        var msg = cellvalue;
                        if (rowObject.state == 1 || rowObject.state == "1") {
                            msg = "";
                        }
                        if (cellvalue == null && rowObject.state != 1) {
                            msg = "";
                        }
                        return msg;
                    }
                },
                { label: "市局编号", name: "cityburceaucode", index: "cityburceaucode", width: 150, align: "center", sortable: false },
                { label: "入住人ID", name: "liveinuserid", hidden: true },
                { label: "起始日期", name: "begindate", index: "begindate", width: 100, align: "center", sortable: false, formatter: function (cellvalue) { return formatDate(cellvalue, 'yyyy-MM-dd'); } },
                { label: "终止日期", name: "enddate", index: "enddate", width: 100, align: "center", sortable: false, formatter: function (cellvalue) { return formatDate(cellvalue, 'yyyy-MM-dd'); } },
                { label: "月租金", name: "monthlyrent", index: "monthlyrent", width: 100, align: "center", sortable: false },
                { label: "押金", name: "deposit", index: "deposit", width: 100, align: "center", sortable: false },
                { label: "备注", name: "description", index: "description", width: 100, align: "center", sortable: false }
            ],
            viewrecords: true,
            rowNum: 30,
            rowList: [30, 50, 100],
            pager: "#gridPager4",
            sortname: 'Code',
            sortorder: 'desc',
            rownumbers: true,
            gridview: true,
            onSelectRow: function (status) {
                selectedRowIndex = $("#" + this.id).getGridParam('selrow');
            },
            gridComplete: function () {
                $("#" + this.id).setSelection(selectedRowIndex, false);
            }
        });
        $('#gridTable4').setGridWidth($(".ui-layout-center").width() - 56);
    }

    //初始化加载系统日志
    function GetLogGrid() {
        var queryJson = $("#filter-form").GetWebControls();
        queryJson["OperateUserId"] = keyValue;
        var $gridTable = $("#gridTable5");
        $gridTable.jqGrid({
            url: "../../SystemManage/Log/GetPageListJson",
            postData: { queryJson: JSON.stringify(queryJson) },
            datatype: "json",
            height: $(window).height() - 195,
            autowidth: true,
            colModel: [
                { label: "主键", name: "LogId", hidden: true },
                {
                    label: "操作时间", name: "OperateTime", index: "OperateTime", width: 160, align: "left",
                    formatter: function (cellvalue, options, rowObject) {
                        return formatDate(cellvalue, 'yyyy-MM-dd hh:mm:ss');
                    }
                },
                { label: "IP地址", name: "IPAddress", index: "IPAddress", width: 150, align: "left" },
                { label: "系统功能", name: "Module", index: "Module", width: 150, align: "left" },
                { label: "操作类型", name: "OperateType", index: "OperateType", width: 70, align: "center" },
                {
                    label: "执行结果", name: "ExecuteResult", index: "ExecuteResult", width: 70, align: "center",
                    formatter: function (cellvalue, options, rowObject) {
                        if (cellvalue == '1') {
                            return "<span class=\"label label-success\">成功</span>";
                        } else {
                            return "<span class=\"label label-danger\">失败</span>";
                        }
                    }
                },
                { label: "执行结果描述", name: "ExecuteResultJson", index: "ExecuteResultJson", width: 100, align: "left" }
            ],
            viewrecords: true,
            rowNum: 30,
            rowList: [30, 50, 100, 500, 1000],
            pager: "#gridPager",
            sortname: 'OperateTime desc',
            rownumbers: true,
            shrinkToFit: false,
            gridview: true
        });
        //点击时间范围（今天、近7天、近一个月、近三个月）
        $("#time_horizon a.btn-default").click(function () {
            $("#time_horizon a.btn-default").removeClass("active");
            $(this).addClass("active");
            switch ($(this).attr('data-value')) {
                case "1"://今天
                    $("#StartTime").val("@DateTime.Now.ToString("yyyy-MM-dd")");
                    $("#EndTime").val("@DateTime.Now.ToString("yyyy-MM-dd")");
                    break;
                case "2"://近7天
                    $("#StartTime").val("@DateTime.Now.AddDays(-7).ToString("yyyy-MM-dd")");
                    $("#EndTime").val("@DateTime.Now.ToString("yyyy-MM-dd")");
                    break;
                case "3"://近一个月
                    $("#StartTime").val("@DateTime.Now.AddMonths(-1).ToString("yyyy-MM-dd")");
                    $("#EndTime").val("@DateTime.Now.ToString("yyyy-MM-dd")");
                    break;
                case "4"://近三个月
                    $("#StartTime").val("@DateTime.Now.AddMonths(-3).ToString("yyyy-MM-dd")");
                    $("#EndTime").val("@DateTime.Now.ToString("yyyy-MM-dd")");
                    break;
                default:
                    break;
            }
            $("#SelectedStartTime").html($("#StartTime").val());
            $("#SelectedEndTime").html($("#EndTime").val());
            SearchEvent();
        });

        //查询点击事件
        $("#btn_Search").click(function () {
            SearchEvent();
            $(".ui-filter-text").trigger("click");
            $("#SelectedStartTime").html($("#StartTime").val());
            $("#SelectedEndTime").html($("#EndTime").val());
        });
        //查询表格函数
        function SearchEvent() {
            var queryJson = $("#filter-form").GetWebControls();
            queryJson["OperateUserId"] = keyValue;
            $("#gridTable").jqGrid('setGridParam', {
                url: "../../SystemManage/Log/GetPageListJson",
                postData: { queryJson: JSON.stringify(queryJson) },
                page: 1
            }).trigger('reloadGrid');
        }
    }

    function btn_detail1() {
        var keyValue = $("#gridTable2").jqGridRowValue("billcode");
        if (checkedRow(keyValue)) {
            dialogOpen({
                id: "Form",
                title: '单据详情(看房申请单)',
                url: '/QualificationManage/Member/SearchRoomDetails?keyValue=' + keyValue,
                width: "1200px",
                height: "800px",
                btn: null,
                callBack: function (iframeId) {
                }
            });
        }
    }

    function btn_detail2() {
        debugger;
        var keyValue = $("#gridTable3").jqGridRowValue("code");
        var state = $("#gridTable3").jqGridRowValue("state");
        if (checkedRow(keyValue)) {
            if (state <= 3) {
                top.tablist.newTab({
                    id: "FirstTrialDetails",
                    title: '单据详情【初审】',
                    closed: true,
                    icon: "fa fa-eye",
                    url: top.contentPath + '/QualificationManage/FirstTrial/Form?keyValue=' + keyValue
                });
            }
            else {
                top.tablist.newTab({
                    id: "RetrialDetails",
                    title: '单据详情【复审】',
                    closed: true,
                    icon: "fa fa-eye",
                    url: top.contentPath + '/QualificationManage/Retrial/Form?keyValue=' + keyValue
                });
            }
        }
    }

    function btn_detail3() {
        var keyValue = $("#gridTable4").jqGridRowValue("id");
        var Code = $("#gridTable4").jqGridRowValue("code");
        if (checkedRow(keyValue)) {
            top.tablist.newTab({
                id: "ContractDetails",
                title: '合同详情【' + Code + '】',
                closed: true,
                icon: "fa fa-eye",
                url: top.contentPath + '/QualificationManage/Member/ContractDetails?keyValue=' + keyValue
            });
        }

    }

    //选房作废
    function btn_selInvalid() {
        var keyValue = $("#gridTable1").jqGridRowValue("id");
        var state = $("#gridTable1").jqGridRowValue("state");
        if (state == 3) {
            dialogMsg("记录已取消！", 0);
            return false;
        }
        var category = $("#gridTable1").jqGridRowValue("category");
        var Msg = "";
        if (category == "配租") {
            Msg = "提交后将无法更改(配租房将保留房源)，是否提交？";
        } else {
            Msg = "提交后将无法更改，是否提交？";
        }
        if (checkedRow(keyValue)) {
            dialogConfirm(Msg, function (r) {
                if (r) {
                    $.SaveForm({
                        url: "../../QualificationManage/SelectRoomRecord/canceForm",
                        param: { keyValue: keyValue },
                        loading: "正在保存数据...",
                        success: function () {
                            location.reload();
                            GetGrid1();
                        }
                    })
                }
            });
        }
    }
    //合同作废
    function btn_cdwInvalid() {
        var keyValue = $("#gridTable4").jqGridRowValue("id");
        var state = $("#gridTable4").jqGridRowValue("state");
        if (state == 4 || State == 5) {
            dialogMsg("合同已结束！", 0);
            return false;
        }
        if (checkedRow(keyValue)) {
            dialogConfirm('提交后将无法更改，是否提交？', function (r) {
                if (r) {
                    $.SaveForm({
                        url: "../../QualificationManage/RentContract/CancelContract",
                        param: { keyValue: keyValue },
                        loading: "正在保存数据...",
                        success: function () {
                            location.reload();
                        }
                    })
                }
            });
        }
    }
</script>
<div class="ui-layout" id="layout" style="height: 100%;  width: 100%;">
    <div class="ui-layout-west">
        <div class="west-Panel" style="height:98%;">
            <div class="profile-nav">
                <ul style="padding-top: 20px;">
                    <li class="active" onclick="skip(1)">会员信息</li>
                    <li onclick="skip(2)">选房记录</li>
                    <li onclick="skip(3)">看房申请记录</li>
                    <li onclick="skip(4)">资格申请记录</li>
                    <li onclick="skip(5)">合同信息</li>
                    <li onclick="skip(6)">网上平台登陆日志</li>
                </ul>
            </div>
        </div>
    </div>
    <div class="ui-layout-center">
        <div class="center-Panel" style="height:98%;">
            <div class="profile-content" style="background: #fff; height: 100%;">
                <div id="MemberInfo">
                    <div class="curved_box">
                        <table class="form" style="margin-top:20px;">
                            <tr>
                                <td class="formTitle">会员编号</td>
                                <td class="formValue">
                                    <input id="Code" type="text" class="form-control" />
                                </td>
                                <td class="formTitle">会员名称</td>
                                <td class="formValue">
                                    <input id="Name" type="text" class="form-control" />
                                </td>
                            </tr>
                            <tr>
                                <td class="formTitle">手机号码</td>
                                <td class="formValue">
                                    <input id="Phone" type="text" class="form-control" />
                                </td>
                                <td class="formTitle">固定电话</td>
                                <td class="formValue">
                                    <input id="PhoneNum" type="text" class="form-control" />
                                </td>
                            </tr>
                            <tr>
                                <td class="formTitle">身份证号</td>
                                <td class="formValue">
                                    <input id="IDCard" type="text" class="form-control" />
                                </td>
                                <td class="formTitle">邮箱地址</td>
                                <td class="formValue">
                                    <input id="EMail" type="text" class="form-control" />
                                </td>
                            </tr>
                            <tr>
                                <td class="formTitle">会员状态</td>
                                <td class="formValue">
                                    <input id="State" type="text" class="form-control" />
                                </td>
                                <td class="formTitle">性别</td>
                                <td class="formValue">
                                    <input id="Sex" type="text" class="form-control" />
                                </td>
                            </tr>
                            <tr>
                                <td class="formTitle">民族</td>
                                <td class="formValue">
                                    <input id="Nation" type="text" class="form-control" />
                                </td>
                                <td class="formTitle">文化程度</td>
                                <td class="formValue">
                                    <input id="Cultural" type="text" class="form-control" />
                                </td>
                            </tr>
                            <tr>
                                <td class="formTitle">婚姻状况</td>
                                <td class="formValue">
                                    <div id="MarryInfo" type="select" disabled="disabled" class="ui-select"></div>
                                </td>
                                <td class="formTitle">户籍地址</td>
                                <td class="formValue">
                                    <input id="HouseholdAddress" type="text" class="form-control" />
                                </td>
                            </tr>
                            <tr>
                                <td class="formTitle">户籍邮编</td>
                                <td class="formValue">
                                    <input id="HouseholdPostalCode" type="text" class="form-control" />
                                </td>
                                <td class="formTitle">居住证</td>
                                <td class="formValue">
                                    <input id="LiveCard" type="text" class="form-control" />
                                </td>
                            </tr>
                            <tr>
                                <td class="formTitle">是否办理本市居住证</td>
                                <td class="formValue">
                                    <input id="HasLiveCard" type="text" class="form-control" />
                                </td>
                                <td class="formTitle">单位名称</td>
                                <td class="formValue">
                                    <input id="CompanyName" type="text" class="form-control" />
                                </td>
                            </tr>
                            <tr>
                                <td class="formTitle">单位类型</td>
                                <td class="formValue">
                                    <input id="CompanyType" type="text" class="form-control" />
                                </td>
                                <td class="formTitle">单位电话</td>
                                <td class="formValue">
                                    <input id="CompanyPhone" type="text" class="form-control" />
                                </td>
                            </tr>
                            <tr>
                                <td class="formTitle">单位地址</td>
                                <td class="formValue">
                                    <input id="CompanyAddress" type="text" class="form-control" />
                                </td>
                            </tr>
                        </table>
                    </div>
                </div>
                <div id="SelectRoom" style="display: none;">
                    <div class="titlePanel">
                        <div class="title-search">
                            <table>
                                <tr>
                                    <td style="padding-left: 5px;">
                                        选房记录
                                    </td>
                                </tr>
                            </table>
                        </div>
                        <div class="toolbar">
                            <div class="btn-group">
                                <label id="lr-edit" class="btn btn-default" onclick="btn_selInvalid()"><i class="fa fa-pencil-square-o"></i>&nbsp;取消</label>
                            </div>
                            <script>$('.toolbar').authorizeButton()</script>
                        </div>
                    </div>
                    <div class="gridPanel">
                        <table id="gridTable1"></table>
                        <div id="gridPager1"></div>
                    </div>
                </div>
                <div id="Rectification" style="display: none;">
                    <div class="titlePanel">
                        看房申请记录
                        <div class="toolbar">
                            <div class="btn-group">
                                <a id="lr-detail1" class="btn btn-default " onclick="btn_detail1()"><i class="fa fa-eye"></i>&nbsp;查看</a>
                            </div>
                        </div>
                    </div>
                    <div class="gridPanel">
                        <table id="gridTable2"></table>
                        <div id="gridPager2"></div>
                    </div>
                </div>
                <div id="Qualification" style="display: none;">
                    <div class="titlePanel">
                        资格申请记录
                        <div class="toolbar">
                            <div class="btn-group">
                                <a id="lr-detail2" class="btn btn-default " onclick="btn_detail2()"><i class="fa fa-eye"></i>&nbsp;查看</a>
                            </div>
                        </div>
                    </div>
                    <div class="gridPanel">
                        <table id="gridTable3"></table>
                        <div id="gridPager3"></div>
                    </div>
                </div>
                <div id="ContractInfo" style="display: none;">
                    <div class="titlePanel">
                        合同信息
                        <div class="toolbar">
                            <div class="btn-group">
                                <a id="lr-detail3" class="btn btn-default " onclick="btn_detail3()"><i class="fa fa-eye"></i>&nbsp;查看</a>
                                <label id="lr-edit" class="btn btn-default" onclick="btn_cdwInvalid()"><i class="fa fa-pencil-square-o"></i>&nbsp;作废</label>
                            </div>
                        </div>
                    </div>
                    <div class="gridPanel">
                        <table id="gridTable4"></table>
                        <div id="gridPager4"></div>
                    </div>
                </div>
                <div id="LogInfo" style="display: none;">
                    <div class="titlePanel">
                        <div class="title-search">
                            <table>
                                <tr>
                                    <td>查询条件</td>
                                    <td style="padding-left: 10px;">
                                        <div class="ui-filter" style="width: 200px;">
                                            <div class="ui-filter-text">
                                                <strong id="SelectedStartTime">@DateTime.Now.AddDays(-7).ToString("yyyy-MM-dd")</strong> 至 <strong id="SelectedEndTime">@DateTime.Now.ToString("yyyy-MM-dd")</strong>
                                            </div>
                                            <div class="ui-filter-list" style="width: 350px;">
                                                <table class="form" id="filter-form">
                                                    <tr>
                                                        <th class="formTitle">操作时间：</th>
                                                        <td class="formValue">
                                                            <input id="Category" type="hidden" value="1" />
                                                            <div style="float: left; width: 45%;">
                                                                <input id="StartTime" readonly type="text" value="@LeSoft.Util.Time.GetDate(-7)" class="form-control input-wdatepicker" onfocus="WdatePicker({maxDate:'%y-%M-%d'})">
                                                            </div>
                                                            <div style="float: left; width: 10%; text-align: center;">至</div>
                                                            <div style="float: left; width: 45%;">
                                                                <input id="EndTime" readonly type="text" value="@LeSoft.Util.Time.GetToday()" class="form-control input-wdatepicker" onfocus="WdatePicker({maxDate:'%y-%M-%d'})">
                                                            </div>
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td class="formTitle">IP地址：</td>
                                                        <td class="formValue">
                                                            <input id="IPAddress" type="text" class="form-control">
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td class="formTitle">操作类型：</td>
                                                        <td class="formValue">
                                                            <input id="OperateType" type="text" class="form-control">
                                                        </td>
                                                    </tr>
                                                    @*<tr>
                                                            <td class="formTitle">功能模块：</td>
                                                            <td class="formValue">
                                                                <input id="Module" type="text" class="form-control">
                                                            </td>
                                                        </tr>*@
                                                </table>
                                                <div class="ui-filter-list-bottom">
                                                    <a id="btn_Reset" class="btn btn-default">&nbsp;重&nbsp;&nbsp;置</a>
                                                    <a id="btn_Search" class="btn btn-primary">&nbsp;查&nbsp;&nbsp;询</a>
                                                </div>
                                            </div>
                                        </div>
                                    </td>
                                    <td style="padding-left: 10px;">
                                        <div id="time_horizon" class="btn-group">
                                            <a class="btn btn-default" data-value="1">今天</a>
                                            <a class="btn btn-default active" data-value="2">近7天</a>
                                            <a class="btn btn-default" data-value="3">近1个月</a>
                                            <a class="btn btn-default" data-value="4">近3个月</a>
                                        </div>
                                    </td>
                                </tr>
                            </table>
                        </div>
                    </div>
                    <div class="gridPanel">
                        <table id="gridTable5"></table>
                        <div id="gridPager5"></div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<style type="text/css">
    .profile-content .formTitle {
        text-align: right;
    }
</style>
